{layout name="../../admin/view/layout/main" /}
{:breadcrumb(['UI 示例:example/layout/index', '示例页面:example/pages/index', '小部件'])}
<style>
    /* 带标签的区域 */
    .shape {    
        border-style: solid;
        border-width: 0 70px 40px 0;
        float: right;
        height: 0px;
        width: 0px;
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
    .offer {
        background: #fff;
        border: 1px solid #ebebeb;
        box-shadow: 0 1px 15px 1px rgba(77, 82, 89, .075);
        margin: 15px 0; 
        overflow: hidden;
    }
    .shape {
        border-color: rgba(255, 255, 255, 0) #4d5259 rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);
    }
    .offer-primary {
        border-color: var(--bs-primary);
    }
    .offer-primary .shape {
        border-color: transparent var(--bs-primary) transparent transparent;
    }
    .offer-danger {
        border-color: var(--bs-danger);
    }
    .offer-danger .shape {
        border-color: transparent var(--bs-danger) transparent transparent;
    }
    .offer-success {
        border-color: var(--bs-success);
    }
    .offer-success .shape {
        border-color: transparent var(--bs-success) transparent transparent;
    }
    .offer-default {
        border-color: #eff2f7;
    }
    .offer-default .shape {
        border-color: transparent #eff2f7 transparent transparent;
    }
    .offer-info {
        border-color: var(--bs-info);
    }
    .offer-info .shape {
        border-color: transparent var(--bs-info) transparent transparent;
    }
    .offer-warning {
        border-color: var(--bs-warning);
    }
    .offer-warning .shape {
        border-color: transparent var(--bs-warning) transparent transparent;
    }
    .shape-text {
        color: #fff;
        font-size: 12px;
        font-weight: bold; 
        position: relative;     
        right: -47px;
        top: 0px;
        white-space: nowrap;
        -ms-transform: rotate(30deg); 
        -o-transform: rotate(360deg); 
        -webkit-transform: rotate(30deg);
        transform: rotate(30deg);
    }	
    .offer-content {
        padding: 20px;
    }
    /* 上两个可弄成通用类 */
    .ribbon {
        width: 150px;
        height: 150px;
        overflow: hidden;
        position: absolute;
        z-index: 10;
    }
    .ribbon-top-left {
        top: -10px;
        left: -10px;
    }
    .ribbon::before,
    .ribbon::after {
        position: absolute;
        z-index: -1;
        content: '';
        display: block;
        border: 5px solid;
    }
    .ribbon span {
        position: absolute;
        display: block;
        width: 225px;
        padding: 8px 0;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .075);
        color: #fff;
        text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
        text-transform: capitalize;
        text-align: center;
    }
    .ribbon-top-left {
        top: -10px;
        left: -10px;
    }
    .ribbon-top-left::before,
    .ribbon-top-left::after {
        border-top-color: transparent;
        border-left-color: transparent;
    }
    .ribbon-top-left::before {
        top: 0;
        right: 50px;
    }
    .ribbon-top-left::after {
        bottom: 50px;
        left: 0;
    }
    .ribbon-top-left span {
        right: -8px;
        top: 30px;
        transform: rotate(-45deg);
    }
    .ribbon-top-right {
        top: -10px;
        right: -10px;
    }
    .ribbon-top-right::before,
    .ribbon-top-right::after {
        border-top-color: transparent;
        border-right-color: transparent;
    }
    .ribbon-top-right::before {
        top: 0;
        left: 36px
    }
    .ribbon-top-right::after {
        bottom: 36px;
        right: 0;
    }
    .ribbon-top-right span {
        left: -8px;
        top: 30px;
        transform: rotate(45deg);
    }
    </style>
    
    <div class="row">
      <div class="col-md-12">
        <div class="card">
          <div class="card-header"><div class="card-title">带标签的区域</div></div>
          <div class="card-body">
            
            <div class="row">
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-default">
                  <div class="shape">
                    <div class="shape-text text-body"> top </div>
                  </div>
                  <div class="offer-content">
                    <h3 class="lead"> Default </h3>
                    <p class="mb-0"> 第十八回 大王庄薛仁贵落魄 怜勇士柳金花赠衣 </p>
                  </div>
                </div>
              </div>
              
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-success">
                  <div class="shape">
                    <div class="shape-text"> top </div>
                  </div>
                  <div class="offer-content">
                    <h3 class="lead text-success"> Success </h3>
                    <p class="mb-0"> 第十九回 富家女逃难托乳母 贫穷汉有幸配淑女 </p>
                  </div>
                </div>
              </div>
              
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-primary">
                  <div class="shape"> <div class="shape-text"> top </div> </div>
                  <div class="offer-content">
                    <h3 class="lead text-primary"> Primary </h3>
                    <p class="mb-0"> 第二十回 射鸿雁薛礼逢故旧 赠盘缠周青同投军 </p>
                  </div>
                </div>
              </div>
              
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-info">
                  <div class="shape">
                    <div class="shape-text"> top </div>
                  </div>
                  <div class="offer-content">
                    <h3 class="lead text-info"> Info </h3>
                    <p class="mb-0"> 第二十一回 樊家庄三寇被获 薛仁贵二次投军 </p>
                  </div>
                </div>
              </div>
              
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-warning">
                  <div class="shape">
                    <div class="shape-text"> top </div>
                  </div>
                  <div class="offer-content">
                    <h3 class="lead text-warning"> Warning </h3>
                    <p class="mb-0"> 第二十二回 樊绣花愿招豪侠婿 薛仁贵怒打出山虎 </p>
                  </div>
                </div>
              </div>
              
              <div class="col-xs-12 col-sm-6 col-lg-4">
                <div class="offer offer-radius offer-danger">
                  <div class="shape">
                    <div class="shape-text"> top </div>
                  </div>
                  <div class="offer-content">
                    <h3 class="lead text-danger"> Danger </h3>
                    <p class="mb-0"> 第二十三回 金钱山老将荐贤 赠令箭三次投军 </p>
                  </div>
                </div>
              </div>
            </div>
            
          </div>
        </div>
      </div>
    </div>
    
    <!--带标签的卡片-->
    <div class="row">
      <div class="col-12 col-sm-6 col-lg-4">
        <div class="card text-center overflow-hidden position-relative">
          <div class="card-status bg-danger"></div>
          <div class="ribbon ribbon-top-left text-danger"><span class="bg-success">最新</span></div>
          <div class="card-header justify-content-center"><div class="card-title">《说唐后传》</div></div>
          <div class="card-body">
            <h1 class="mb-1">¥0.25<span class="fs-6 text-muted"> / 千字</span></h1>
            <p class="mb-2">第三十六回 番将力擒张志龙 周青怒锁先锋将</p>
            <button type="button" class="btn btn-success">阅读详细</button>
          </div>
        </div>
      </div>
      <div class="col-12 col-sm-6 col-lg-4">
        <div class="card text-center overflow-hidden position-relative">
          <div class="card-status bg-danger"></div>
          <div class="ribbon ribbon-top-left text-danger"><span class="bg-success">最新</span></div>
          <div class="card-header justify-content-center"><div class="card-title">《说唐后传》</div></div>
          <div class="card-body">
            <h1 class="mb-1">¥0.25<span class="fs-6 text-muted"> / 千字</span></h1>
            <p class="mb-2">第三十五回 尉迟恭犒赏查贤士 薛仁贵月夜叹功劳</p>
            <button type="button" class="btn btn-success">阅读详细</button>
          </div>
        </div>
      </div>
      <div class="col-12 col-sm-6 col-lg-4">
        <div class="card text-center overflow-hidden position-relative">
          <div class="card-status bg-danger"></div>
          <div class="ribbon ribbon-top-left text-danger"><span class="bg-danger">最热</span></div>
          <div class="card-header justify-content-center"><div class="card-title align-items-center">《说唐后传》</div></div>
          <div class="card-body">
            <h1 class="mb-1">¥0.25<span class="fs-6 text-muted"> / 千字</span></h1>
            <p class="mb-2">第一回 秦元帅兴兵定北 唐贞观御驾亲征</p>
            <button type="button" class="btn btn-danger">阅读详细</button>
          </div>
        </div>
      </div>
    </div>